package com.shiguiwu.springmybatis.algorithm.recursion;

/**
 * @description: 递归问题
 * @author: stone
 * @date: Created by 2021/3/14 22:27
 * @version: 1.0.0
 * @pakeage: com.shiguiwu.springmybatis.recursion
 */
public class RecursionTests {


    public static void main(String[] args) {

        print(7);

    }

    public static void print(int n) {
        if (n < 1) {
            return;
        }
        System.out.println("递归测试:n=" + n);
        print(n - 1);
        System.out.println("递归测试1:n=" + n);
    }
}
